package com.zhika.zishi.fragments;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;

import com.zhika.zishi.R;
import com.zhika.zishi.activity.SelectPictureActivity;

/**
 * Created by shi-02 on 2015/4/27.
 */
public class NewStrategyFragment extends Fragment {

    private View view;

    private ImageView addImageView;

    private Context context;

    @Override
    public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {
        view = inflater.inflate(R.layout.new_strategy_fragment, container, false);
        initView();
        return view;
    }

    private void initView() {
        context = getActivity();

        addImageView = (ImageView) view.findViewById(R.id.new_strategy_fragment_add_image_view);
        addImageView.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                Intent intent = new Intent(context, SelectPictureActivity.class);
                context.startActivity(intent);
            }
        });
    }
}
